
package com.wulian.user.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.springframework.data.annotation.Transient;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 
* @ClassName: SysDept 
* @Description: TODO(部门管理) 
* @author 马志豪
* @date 2019年9月18日 上午9:25:49 
*
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@TableName("sys_dept")
public class SysDept extends Model<SysDept> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "dept_id", type = IdType.AUTO)
    private Integer deptId;
    /**
     * 部门名称
     */
    private String name;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 是否删除  -1：已删除  0：正常
     */
    @TableField("del_flag")
    private String delFlag;

    @TableField("parent_id")
    private Integer parentId;

    /**
     * 留存佣金比例%
     */
    @TableField("retain_com_scale")
    private Integer retainComScale;

    /**
     * 机构唯一编码
     */
    @TableField("dept_code")
    private String deptCode;

    /**
     * 父级机构名称
     */
    @TableField(exist = false)
    private String parentName;
    
    @TableField(exist = false)
    private String adminRoleUsers;
    
    @TableField(exist = false)
    private String menuIds;
    
    @TableField(exist = false)
    private List<Integer> menuIdList;

    @TableField("company_id")
    private Integer companyId;

    @TableField("deptadmin_id")
    private Integer deptadminId;

    @TableField("dept_address")
    private String deptAddress;

    @TableField("deptadmin_Name")
    private String deptadminName;

    @TableField("deptadmin_Status")
    private String deptadminStatus;

    @TableField("deptadmin_Phone")
    private String deptadminPhone;

    @TableField("deptadmin_createTime")
    private String deptadminCreateTime;

    // 追加roleID，返回值使用
    private Integer roleId;

    // 20210513 追加经纬度信息
    private double longitude;
    private double latitude;

    @Override
    protected Serializable pkVal() {
        return this.deptId;
    }

}
